﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.Serialization;
using System.Xml.Serialization;

namespace GolfSigma.Inventory.Model
{
    public class GetInventoryRequest : IRequest
    {
        /// <summary>
        /// SearchId is required to return inventory
        /// </summary>
        public UInt64 SearchId { get; set; }

        public GetInventoryRequest()
        {
            SearchId = 0;
        }
        public GetInventoryRequest(UInt64 searchId)
        {
            SearchId = searchId;
        }

        #region IRequest Members

        public string HttpVerb
        {
            get { return "GET"; }
        }

        public string HttpPath
        {
            get {  return "/teetimes/" + SearchId.ToString(); }
        }

        public IDictionary<string, string> HttpParameters
        {
            get { return null; }
        }

        public IDictionary<string, string> HttpHeaders
        {
            get { return null; }
        }

        #endregion
    }

    [XmlRoot("Response")]
    public class GetInventoryResponse
    {
        [XmlElement("Search")]
        public Search Search { get; set; }

        [XmlArray("TeeTimes")]
        public List<TeeTime> TeeTimes { get; set; }

        [XmlElement("TeeTimesMetadata")]
        public TeeTimesMetadata TeeTimesMetadata { get; set; }

        [XmlElement("ResponseMetadata")]
        public ResponseMetadata ResponseMetadata { get; set; }
    }
}
